package com.aifast.system.sys.entity;

import com.aifast.common.dict.DictBind;
import com.aifast.common.dict.DictBindType;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @Author fujian
 * @since 2022/10/19 16:45
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class SysMessageUser implements Serializable {
    /** pk */
    @ExcelProperty("ID")
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    private static final long serialVersionUID=1L;
    /** 用户id */
    @ExcelProperty("用户id")
    @DictBind(mode = DictBindType.JOIN, tableName = "sys_user", columns = "real_name", target = "userStr")
    private Integer userId;

    /** 消息id */
    @ExcelProperty("消息id")
    private Integer messageId;

    /** 是否已读 */
    @ExcelProperty("是否已读")
    @DictBind(type = "boolean",target = "readStr")
    private String isRead;

    /** 发送时间 */
    @ExcelProperty("发送时间")
    private String sendTime;

    private Integer tenantId;

}
